Back to Main Menu

Update Functional Location

Introduction

The Assetic REST API endpoints allow per record update of Functional Location via:

  • PUT/api/v2/functionallocation

 

Please read the article Asset Integration Overview if unclear how this endpoint relates to the asset structure in Assetic.

 

This API endpoint is real-time in that the functional location is updated immediately and returns the new definition of the functional location.

 

There is rate limit applied to the Assetic REST API's which should be considered when attempting to create a large number of records.

 

The process described in Data-Exchange-Integration should be used for data migration projects or large volume transactions.

PUT /api/v2/functionallocation

Functional Location Fields

Introduction

The API PUT /api/v2/functionallocation updates the Functional Location, which is comprised of the core fields applied to all functional location definitions, and a set of additional attribute fields.  The list of attribute fields is dependent on the Functional Location Type.  Note that some of these non-core attribute fields may be common to all Functional Location Types.

Core Fields

The core fields for Functional Location are listed in the article Asset Integration Overview.

 

When updating a functional location observe the following rules:

  • The unique Assetic GUID for the functional location is mandatory.  This GUID cannot be updated.
  • "FunctionalLocationId" is the "User Friendly Id" for the Functional Location.  It is mandatory and can be changed new a new value via this API, however the new value must be unique across all functional locations regardless of the Functional Location Type.
    • If using auto-id generation the FunctionLocationId can be set to a new value outside of auto-id generation.
  • "FunctionalLocationName" is not unique, it can be duplicated.
  • "FunctionalLocationTypeId" is mandatory and cannot be changed
  • "FunctionalLocationType" will be ignored in the request but returned in the response.

Attribute Fields

The non-core Functional Location attribute fields are included in the request as an object containing key-value pairs where attribute name is the key.  If an attribute does not require updating it can be omitted from the list of attributes.

Example: Update Functional Location

Sample Payload

The following sample updates Functional Location with a GUID of "ebb41eb2-0fe2-494f-96de-cfe11545208a".  The GUID may be obtained via the Assetic REST API GET api/v2/functionallocations

 

Two attributes are also updated, "Zone" and "General Comments"

Request URL:

https://[your_site].assetic.net/api/v2/functionallocations/ebb41eb2-0fe2-494f-96de-cfe11545208a

Request Body:

{
"FunctionalLocationId": "ABBFL2",
"FunctionalLocationName": "Name 1",
"FunctionalLocationTypeId": "aab4526b-e2b3-4979-8b4b-c839a7f4b685",
"Attributes":
{
"GroupAssetZone":"Zone 1",
"GroupAssetComment":"This is an example comment"
}
}